/*
 * 快递费用计算（7分）
 */

#include <stdio.h>
#include <math.h>

int main() {
	setbuf(stdout, NULL);

	int area_code;
	float weight, price;

	scanf("%d,%f", &area_code, &weight);

		switch (area_code) {
			case 0:
				price = 10 + 3 * (int) ceil(weight-1);
				break;
			case 1:
				price = 10 + 4 * (int) ceil(weight-1);
				break;
			case 2:
				price = 15 + 5 * (int) ceil(weight-1);
				break;
			case 3:
				price = 15 + 6.5 * (int) ceil(weight-1);
				break;
			case 4:
				price = 15 + 10 * (int) ceil(weight-1);
				break;
			default:
				printf("Error in Area\n");
				printf("Price:  0.00\n");

				return -2;
		}

		printf("Price: %5.2f\n",price);

	return 0;
}